
\subsection{Re-randomization Component}
After SALADS de-randomize the data structure instance to avoid the
pointer type casting and external \& shared API problem, it is
nature to re-randomize the data structure instance. It is easy for
us to reset the random seed for the data structure instance as the
argument of the external \& shared API when the program returns from
the API. For the type casting, we select the points where there is
no different type pointer that points to the data structure
instance. We use the points-to information calculated by our alias
analysis component which is mentioned in Section 3.3. Take our
motivation program in Figure~\ref{fig:example1} for instance, we can
re-randomize the data structure at the statement \texttt{p.a=2},
because the points-to information contains no pointer to the data
structure instance \texttt{p}. In practice, we insert the
re-randomization routine before the re-randomization point, take the
Figure~\ref{fig:example1}(c) for example, we will insert the
re-randomization routine before node 2 and 13. The re-randomization
routine checks whether the seed equals to -1, if so, it indicates
the data structure instance is de-randomized, then the routine will
invoke the randomization routine to reorder the fields and set the
new seed.
